package org.msn.gui.controller;

import javafx.fxml.FXML;
import javafx.scene.control.TextField;
import javafx.scene.input.MouseEvent;
import org.msn.gui.constant.APIConstant;
import org.msn.gui.init.ParentInit;

public class GetUsernameController extends ParentInit {
    @FXML
    private TextField username;

    public void cancel(MouseEvent mouseEvent) {
        MsnController.exportGetUsernameStage.close();
    }

    public void confirm(MouseEvent mouseEvent) {
        // 存放名字
        APIConstant.CONFIG.put("name", username.getText());
        MsnController.exportGetUsernameStage.close();
    }
}
